<#assign tit>客诉审批</#assign>
<@page.html title=tit>
<script type="text/javascript">
  function audit(r) {
    if(!window.confirm("确定审批"+(r==1?"通过":(r==3?"拒绝":"退回"))+"?")) return;
    var fm = getEl("fm_input");
    fm.auditResult.value = r;
    post(fm);
  }
</script>
<div style="width:800px;">
  <div class="kbox">
    <form id="fm_input" method="post" action="_audit${complaint.status}" onsubmit="return post(this);">
      <input type="hidden" name="complainId" value="${complaint.complainId}">
      <input type="hidden" name="auditResult" value="">
      <#include "../complaint/info.ftl">
      <table class="input noprint" align="center">
        <tr>
          <th>审批意见<#if complaint.status=7><br><label><input type="checkbox" name="auditAdd" value="1">加签</label></#if></th>
          <td><textarea name="auditNote" cols="40" rows="3"></textarea></td>
        </tr>
      </table>
    </form>
  </div>
  <div class="button noprint"><input type="button" value="打印" onclick="window.print();" style="float:left;">
    <input type="button" value="通过" onclick="audit(1);">
    <input type="button" value="退回" onclick="audit(2);">
    <#if complaint.status=2><input type="button" value="终止" onclick="audit(3);"></#if>
    <#if complaint.status=7 || complaint.status=8><input type="button" value="拒绝" onclick="audit(3);"></#if></div>
</div>
</@page.html>